/**
 * article模块接口列表
 */

import base from './base'; // 导入接口域名列表
import axios from './http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块
import Cookie from 'js-cookie'
const userInfo = {    
    //获取用户信息    
    getUserInfo () {        
        return axios.get(`${base.sq}/topics`);    
    },
    //校验token
    checkToken(){
        let params = {
            "token":Cookie.get("token")
        }
        return axios.post(`${base.sq}/userpolicy/userpolicy/auth/v1/check_token`,params);    
    } , 
    //退出登录
    loginOut(){
        return axios.post(`${base.sq}/userpolicy/userpolicy/auth/v1/log_out`,{}, {
            headers: {
                token: Cookie.get("token")
            }
        });    
    }   
   
}

export default userInfo;
